<?php $this->load->view('template/header'); ?>
<div class="grid_12 mainbody">
    <h2>Justificantes</h2>
    <div class="search">
        <?php echo form_open('justificantes/search'); ?>
        <label for="search">Buscar</label><input type="text" name="search" value="" class="ui-corner-all" />
        <button id="button" class="ui-button ui-widget ui-state-default ui-widget ui-widget-content ui-corner-all ui-button-text-only" role="button" aria-disabled="false"><span class="ui-button-text">Enviar</span></button>

        <?php echo form_close(); ?>
    </div>
    <a href="<?php echo site_url('justificantes/add/') ?>"><?php echo img('img/icons/table_add.png'); ?></a>
    <table id="justificantes">
        <tr>
            <th></th>
            <th></th>
            <th>Mes</th>
            <th>Comisión</th>
            <th>Poliza</th>
            <th>Año</th>

        </tr>
        <?php foreach ($query->result() as $row) { ?>
            <tr>
                <td><a href="<?php echo site_url('justificantes/edit/' . $row->id) ?>"><?php echo img('img/icons/table_edit.png'); ?></a></td>
                <td><a href="<?php echo site_url('justificantes/delete/' . $row->id) ?>"><?php echo img('img/icons/table_delete.png'); ?></a></td>
                <td><?php echo $row->mes ?></td>
                <td><?php echo $row->comision ?></td>
                <td><?php echo $row->polizas_id ?></td>     
                <td><?php echo $row->anyo ?></td>    
            </tr>
        <?php } ?>
    </table>
    <?php echo $paginator ?></div>
<?php $this->load->view('template/footer'); ?>